﻿using System;

using SharedGenomics.Core;

namespace SharedGenomics.Domain
{
    public enum JobStatus
    {
        NotSubmitted = 0,
        Queued = 1,
        Running = 2,
        Finished = 3,
        Failed = 4,
        Cancelled = 5
    }

    public static class JobStatusExtensions
    {
        public static bool IsComplete(this JobStatus status)
        {
            return status.In(JobStatus.Cancelled, JobStatus.Failed, JobStatus.Finished);
        }
    }
}
